<template>
	<view>
		<u-navbar title-color="#333" title-bold title-size="36" title="充值记录" :border-bottom="false"></u-navbar>
		<view class="m-div">
			<view class="m-item flex flex_sb" v-for="(item,index) in datalist" :key="index">
				<view class="">
					<view class="font_weight">
						{{item.package_name}}
					</view>
					<view class="u-m-t-18 font_10_666">
						{{item.created_at}}
					</view>
				</view>
				<view class="">
					<span class="m-fh">¥</span>
					<span class="m-num">{{item.price}}</span>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				datalist:[]
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			getList() {
				this.$api({
					url: '/user/recharge_log',
					method: 'get',
					data: {
						token: uni.getStorageSync("token"),
					},
				}).then(res => {
					if (res.code == 1) {
						this.datalist = res.data.data
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.m-div{
		padding: 32rpx;
		.m-item{
			width: 686rpx;
			// height: 142rpx;
			background: #FFFFFF;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			padding: 28rpx 24rpx;
			margin-bottom: 24rpx;
			
			.m-fh{
				font-weight: bold;
				font-size: 24rpx;
				color: #FC3A30;
			}
			.m-num{
				font-weight: bold;
				font-size: 36rpx;
				color: #FC3A30;
			}
		}
	}
</style>
